package com.proxy.autoclick.clicker.thread;

import java.util.concurrent.Callable;

import org.apache.http.client.HttpClient;

import com.proxy.autoclick.clicker.service.ClickerService;
import com.proxy.autoclick.clicker.valueobject.KeywordAddress;

public class ClickerThreadPoolTask implements Callable<Void>{
	
	private KeywordAddress keywordAddress;
	private HttpClient httpclient;
	
	public ClickerThreadPoolTask(KeywordAddress keywordAddress,HttpClient httpclient)
	{
		this.keywordAddress = keywordAddress;
		this.httpclient = httpclient;
	}


	@Override
	public Void call() throws Exception {
		ClickerService clickerService = new ClickerService(keywordAddress, httpclient);
		try {
			clickerService.startCheckAndClick();
		} catch (Exception e) {
			e.printStackTrace();
		}
		return null;
	}

}
